import request from '@/utils/request.js'
const PATH = '/admin/news'

// 获取资讯列表
export const getInfoList = ({ page, pageSize, title }) =>
  request.get(PATH + '/pageQuery', { params: { page, pageSize, title } })

// 添加资讯
export const addInfo = (data) => request.post(PATH + '/add', data)

// 删除资讯
export const deleteByIds = (ids) =>
  request.delete(PATH + '/deleteByIds', { params: { ids: ids.join(',') } })

// 修改资讯
export const updateInfo = (data) => request.put(PATH + '/update', data)
